﻿@model CommerceOne.Models.ProductDetailViewModel
           
<div id="center_column" class="center_column">
    <script type="text/javascript">
// <![CDATA[
        // PrestaShop internal settings
        var currencySign = '$';
        var currencyRate = '1';
        var currencyFormat = '1';
        var currencyBlank = '0';
        var taxRate = 0;
        var jqZoomEnabled = false;
        //JS Hook
        var oosHookJsCodeFunctions = new Array();
        // Parameters
        var id_product = '19';
        var productHasAttributes = false;
        var quantitiesDisplayAllowed = true;
        var quantityAvailable = 100;
        var allowBuyWhenOutOfStock = false;
        var availableNowValue = '';
        var availableLaterValue = '';
        var productPriceTaxExcluded = 145 - 0.000000;
        var reduction_percent = 0;
        var reduction_price = 0;
        var specific_price = 0;
        var specific_currency = false;
        var group_reduction = '1';
        var default_eco_tax = 0.000000;
        var ecotaxTax_rate = 0;
        var currentDate = '2012-03-04 15:40:15';
        var maxQuantityToAllowDisplayOfLastQuantityMessage = 3;
        var noTaxForThisProduct = true;
        var displayPrice = 1;
        var productReference = '';
        var productAvailableForOrder = '1';
        var productShowPrice = '1';
        var productUnitPriceRatio = '0.000000';
        var idDefaultImage = 55;
        // Customizable field
        var img_ps_dir = 'http://livedemo00.template-help.com/prestashop_34916/img/';
        var customizationFields = new Array();
        customizationFields[0] = new Array();
        customizationFields[0][0] = 'img0';
        customizationFields[0][1] = 0;
        // Images
        var img_prod_dir = 'http://livedemo00.template-help.com/prestashop_34916/img/p/';
        var combinationImages = new Array();
        combinationImages[0] = new Array();
        combinationImages[0][0] = 55;
        combinationImages[0][1] = 56;
        combinationImages[0][2] = 57;
        // Translations
        var doesntExist = 'The product does not exist in this model. Please choose another.';
        var doesntExistNoMore = 'This product is no longer in stock';
        var doesntExistNoMoreBut = 'with those attributes but is available with others';
        var uploading_in_progress = 'Uploading in progress, please wait...';
        var fieldRequired = 'Please fill in all required fields, then save the customization.';
//]]>
    </script>
    <!-- Breadcrumb -->
    @Html.Partial("_Breadcrumb", @Model.Breadcrumb)
    <!-- /Breadcrumb -->

    <div id="primary_block" class="clearfix">
        <h1>
           @Model.Product.Name
        <!-- right infos-->
        <div id="pb-right-column">
            <!-- product img-->
            @if (Model.Product.DefaultPicture != null)
            {
            <div id="image-block">
                <img src="@Model.Product.DefaultPicture.Large"
                    title="@Model.Product.Name" alt="@Model.Product.Name"
                    id="bigpic" width="290" height="272" />
            </div>
            }
            <!-- thumbnails -->
            <div id="views_block">
                <div id="thumbs_list">
                @if (Model.Product.ProductPhoto != null)
                {
                    <ul id="thumbs_list">
                         @if (Model.Product.DefaultPicture != null)
                         {
                             <li id="thumbnail_55"><a href="@Model.Product.DefaultPicture.ThickBox"  rel="other-views" class="thickbox shown" title="@Model.Product.Name">
                                 <img id="thumb_55" src="@Model.Product.DefaultPicture.Medium" alt="@Model.Product.Name" height="82" width="90" />
                             </a></li>
                         }
                         
                         @foreach (var item in Model.Product.ProductPhoto)
                         {
                             if (item.IsPrimary) { continue; }
                             <li id="thumbnail_55"><a href="@item.ThickBox"  rel="other-views" class="thickbox" title="@Model.Product.Name">
                                 <img id="thumb_55" src="@item.Medium" alt="@Model.Product.Name" height="82" width="90" />
                             </a></li>
                         }
                    </ul>
                }
                </div>
            </div>
            <span id="wrapResetImages" style="display: none;">
                <div>
                    <a id="resetImages" href="http://livedemo00.template-help.com/prestashop_34916/product.php?id_product=19"
                        onclick="$('span#wrapResetImages').hide('slow');return (false);">Display all pictures</a></div>
            </span>
            <!-- usefull links-->
            <ul id="usefull_link_block">
                <li><a href="javascript:print();">Print</a></li>
                <li><span id="view_full_size" class="span_link">View full size</span></li>
            </ul>
        </div>
        <!-- left infos-->
        <div id="pb-left-column">
            <div id="short_description_block">
                <div id="short_description_content" class="rte align_justify">
                  @Model.Product.ShortContent
                </div>
                <p class="buttons_bottom_block more_details">
                    <a href="javascript:{}" class="button">More details</a></p>
            </div>
            <!-- add to cart form-->
            @using (Html.BeginForm("AddToCart", "Cart", FormMethod.Post, new { id = "buy_block" }))
            { 
            @*<form id="buy_block" action="http://livedemo00.template-help.com/prestashop_34916/cart.php" method="post">*@
            <!-- hidden datas -->
            <p class="hidden">
                <input type="hidden" name="token" value="cdb0f7ccff01834d6226f69646336509" />
                <input type="hidden" name="id_product" value="@Model.Product.ID" id="product_page_product_id" />
                <input type="hidden" name="add" value="1" />
                <input type="hidden" name="id_product_attribute" id="idCombination" value="" />
                @Html.Hidden("id", Model.Product.ID) 
                @Html.Hidden("returnUrl", Request.Url.PathAndQuery) 
            </p>
            <!-- prices -->
            <p class="price">
                <span class="our_price_display"><span id="our_price_display">@Model.Product.ListPrice</span>
                @if (Model.Product.IncludeVAT.Value)
                {
                    <spa>tax include.</spa> 
                }
                else
                {
                    <spa>tax excl.</spa> 
                }
                </span>
            </p>
            <div id="other_prices">
            </div>
            <p id="product_reference" style="display: none;">
                <label for="product_reference">
                    Reference :
                </label>
                <span class="editable"></span>
            </p>
            <!-- quantity wanted -->
            <p id="quantity_wanted_p">
                <label>
                    Quantity :</label>
                <input type="text" name="qty" id="quantity_wanted" class="text" value="1" size="2"
                    maxlength="3" />
            </p>
            <!-- minimal quantity wanted -->
            <p id="minimal_quantity_wanted_p" style="display: none;">
                You must add <b id="minimal_quantity_label">1</b> as a minimum quantity to buy this
                product.</p>
            <!-- availability -->
            <p id="availability_statut" style="display: none;">
                <span id="availability_label">Availability:</span> <span id="availability_value">
                </span>
            </p>
            <!-- number of item in stock -->
            <p id="pQuantityAvailable">
                <span id="quantityAvailable">@Model.Product.InStockQuantity</span> <span style="display: none;" id="quantityAvailableTxt">
                    item in stock</span> <span id="quantityAvailableTxtMultiple">items in stock</span>
            </p>
            <!-- Out of stock hook -->
            <p id="oosHook" style="display: none;">
            </p>
            <p id="last_quantities" style="display: none;">
                Warning: Last items in stock!</p>
            <p id="add_to_cart" class="buttons_bottom_block">
                <a class="exclusive" href="javascript:document.getElementById('add2cartbtn').click();">
                    Add to cart</a>
                <input id="add2cartbtn" type="submit" name="Submit" value="Add to cart" />
            </p>
            <div class="clearblock">
            </div>
            
            }
        </div>
    </div>
    <!-- description and features -->
    <div id="more_info_block" class="clear">
        <ul id="more_info_tabs" class="idTabs idTabsShort">
            <li><a id="more_info_tab_more_info" href="#idTab1">More info</a></li>
            <li><a id="more_info_tab_data_sheet" href="#idTab2">Data sheet</a></li>
        </ul>
        <div id="more_info_sheets" class="sheets align_justify">
            <!-- full description -->
            <div id="idTab1">
                <p>
                    @Model.Product.Description
                    </p>
            </div>
            <!-- product's features -->
            <ul id="idTab2" class="bullet">
                <li><span>Width</span> @Model.Product.Width</li>
                <li><span>Height</span> @Model.Product.Height</li>
                <li><span>Depth</span> @Model.Product.Depth </li>
                <li><span>Weight</span> @Model.Product.Weight</li>
                <li><span>Size</span> @Model.Product.Size</li>
            </ul>
        </div>
    </div>
    <!-- Customizable products -->
</div>
